`timescale 10ns / 1ns 

module HEX_to_BCD_tb;

    reg [15:0] hex;
    wire [3:0] ones, tens, hundreds, thousands, ten_thousands;

    initial begin
        $dumpfile("output/HEX_to_BCD_tb.vcd");
        $dumpvars(0, HEX_to_BCD_tb);
    end

    initial begin
        hex = 0;

        #10 hex = 16'b1;
        #10 hex = 16'b11;
        #10 hex = 16'b111;
        #10 hex = 16'b1111;
        #10 hex = 16'b1111_1;
        #10 hex = 16'b1111_11;
        #10 hex = 16'b1111_111;
        #10 hex = 16'b1111_1111;
        #10 hex = 16'b1111_1111_1;
        #10 hex = 16'b1111_1111_11;
        #10 hex = 16'b1111_1111_111;
        #10 hex = 16'b1111_1111_1111;

        repeat (10) begin
            #10;
            hex = {$random} % 20000;
            #10;
        end

        #400 $stop;
    end

    HEX_to_BCD HEX_to_BCD_inst (
        .hex                (hex),
        .ones               (ones),
        .tens               (tens),
        .hundreds           (hundreds),
        .thousands          (thousands),
        .ten_thousands      (ten_thousands)
    );

endmodule  //HEX_to_BCD_tb